/**
 * Created by bdbs on 2017/6/20.
 */
const { app, BrowserWindow } = require('electron');

class MainWindow extends BrowserWindow {
  constructor(url) {
    super({
      width: 200,
      height: 300,
      show: false,
      resizable: false,
      frame: false,
      webPreferences: { backgroundThrottling: false },
    });

    this.loadURL(url);
    this.on('blur', this.handleBlur.bind(this));
  }

  handleBlur() {
    this.hide();
  }
}

module.exports = MainWindow;
